#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int iq;
	while (scanf("%d", &iq) != EOF) 
	{
		printf(iq>=140?"genius!":"fine");
	}
	return 0;
}